$OpenBSD: patch-src_configure_in,v 1.2 2015/04/10 12:25:46 sthen Exp $
--- src/configure.in.orig	Thu Apr  9 21:08:22 2015
+++ src/configure.in	Thu Apr  9 23:41:51 2015
@@ -557,10 +557,10 @@ if test "$enable_luainterp" = "yes" -o "$enable_luaint
 	AC_MSG_RESULT(yes)
       else
 	AC_MSG_RESULT(no)
-	AC_MSG_CHECKING(if lua.h can be found in $vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua)
-	if test -f $vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua/lua.h; then
+	AC_MSG_CHECKING(if lua.h can be found in $vi_cv_path_lua_pfx/include/lua-$vi_cv_version_lua)
+	if test -f $vi_cv_path_lua_pfx/include/lua-$vi_cv_version_lua/lua.h; then
 	  AC_MSG_RESULT(yes)
-	  LUA_INC=/lua$vi_cv_version_lua
+	  LUA_INC=/lua-$vi_cv_version_lua
 	else
 	  AC_MSG_RESULT(no)
 	  vi_cv_path_lua_pfx=
@@ -585,9 +585,9 @@ if test "$enable_luainterp" = "yes" -o "$enable_luaint
     else
       if test "X$LUA_INC" != "X"; then
 	dnl Test alternate location using version
-	LUA_LIBS="-L${vi_cv_path_lua_pfx}/lib -llua$vi_cv_version_lua"
+	LUA_LIBS="-L${vi_cv_path_lua_pfx}/lib -llua$vi_cv_version_lua -lm"
       else
-	LUA_LIBS="-L${vi_cv_path_lua_pfx}/lib -llua"
+	LUA_LIBS="-L${vi_cv_path_lua_pfx}/lib -llua -lm"
       fi
     fi
     if test "$enable_luainterp" = "dynamic"; then
